<? require_once "hotel.php" ?>
<? require_once 'head.html' ?>

<? if ($_POST["type"] == "") { ?>
  Ops, You have to make choice about room type!
<? } else { ?> 

<? $result = Hotel::bookRoom($_POST["type"], $_POST["lastname"])?>
<? if ($result) { ?>
  <h1> Your room has been booked. </h1>
  <p>Your room type number is <?= $_POST["type"] ?>.
  <p>You are register as  <?= $_POST["lastname"] ?>.
<? } else { ?>
  <h1>Unanable to book a room: <?= $result ?></h1>
<? } } ?>
  <p>
  What you want to do now?
  <ul>
    <li> <a href="participants.php"> Go to list of participiants </a>
    <li> <a href="hotellist.php"> Go to list of rooms </a>
  </ul>

<? require 'tail.html' ?>

